# 作者：石吴震
# 2024年12月31日00时03分53秒
# 474160957@qq.com

class Parent():
    def __init__(self,height):
        self.height=height


class Son1(Parent):
    def __init__(self,age,*args):
        self.age=age
        super().__init__(*args)

class Son2(Parent):
    def __init__(self, score,*args):
        self.score=score
        super().__init__(*args)
class Grandson(Son1, Son2):
    def __init__(self, name, *args):
        self.name=name
        super().__init__(*args)  # 调用父类的构造函数,该地址还是Grandson的地址


if __name__ == '__main__':
    xia0ming=Grandson('小明',10,90,180)
    print(xia0ming.name)
    print(xia0ming.age)
    print(xia0ming.score)
    print(xia0ming.height)
    print(Grandson.__mro__)  # 输出类的继承顺序,即super的调用顺序，用的是C3算法



